const experss = require("express")
const expressjoi = require("@escook/express-joi")

const {
  reg_artistcate_scheam,
  update_cate_schema,
} = require("../scheam/artist_cate")

const artistrouter = experss.Router()
const artistcateContral = require("../control/artist_cate")

artistrouter.get("/cates", artistcateContral.getcatelist)
artistrouter.post(
  "/addcates",
  expressjoi(reg_artistcate_scheam),
  artistcateContral.addcates
)
artistrouter.delete("/deletecate/:id", artistcateContral.deletecate)
artistrouter.get("/cates/:id", artistcateContral.getcatasbyid)
artistrouter.post(
  "/updatecate",
  expressjoi(update_cate_schema),
  artistcateContral.updatacatebyid
)
module.exports = artistrouter
